function ModuleViewFile(doc, container, width, height, user, date, options) {
  this._doc = doc;
  this._container = container;
  this._width = width;
  this._height = height;
  this._user = user;
  this._date = date;
  this._options = options;
  
  this._createElements();
}

ModuleViewFile.prototype._createElements = function() {
  this._gui = new ViewFile(document, this._container, this._width, this._height, this._user, this._date, this._options)._gui;
  
  var item = (this._options && this._options.item) ? this._options.item : null;
  if (item.name) {
    this._gui.name.appendChild(document.createTextNode(MiscUtils.getShortStr(item.name, 8)));
  }
  this._gui.icon.src = 'image/upload/file.png';
  
  this._p = new ModulePopupBoxSimpleTip();
  
  var _self = this;
  if (item.name && item.size) {
    this._container.onmouseover = function() { var div = document.createElement('div');
                                               div.appendChild(document.createTextNode(item.name + ', ' + item.size / 1000 + 'k'));
                                               var pos = DOMUtils.findPos(this)
                                               _self._p._open(div, { pos: [pos[0] + 100, pos[1] + 100 ] });
                                             };
    this._container.onmouseout = function() { _self._p._close(); }; 
  }
};

ModuleViewFile.prototype._close = function() {
  this._p._close();
};

